#include <iostream>

using namespace std;

int main()
{
	int x = 37;
	int total_num1s = 0;
	while(x){
		x = x & (x-1);	/* x & (x-1) eliminate a 1 each time */
		/*
		x = 37;
		100101
		x-1
		100100
		
		x = 36
		100100
		x-1
		100011
		*/
		total_num1s++;
	}
	cout <<total_num1s <<endl;

	cin.get();
	return 0;
}